<?php require_once 'header.php';?>    
<!-- DataTables Responsive CSS -->
    <link href="sb2/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            公开文件下载
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>标题</th>
                                        <th>文件大小</th>
                                        <th>上传时间</th>
                                    </tr>
                                </thead>
                                <tbody>
                                	<?php
                                	$i=0;
                                	foreach ($result as $row){$i++;
                                	?>
                                    <tr class="<?php echo $i%2==0?"even":"odd";?> gradeA">
                                    	<td><?php echo $i;?></td>
                                        <td><a href="uploader/filem/<?php echo $row['fname']?>" target="_blank"><?php echo $row['ftitle']?></a></td>
                                        <td><?php echo round($row['fsize']/1024/1024,2)?>MB</td>
                                        <td><?php echo $row['atime']?></td>
                                    </tr>
                                	<?php 
                                	}
                                	?>
                                </tbody>
                            </table>
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
             </div>
        </div>
        <!-- /#page-wrapper -->
  </div>
        <!-- DataTables JavaScript -->
<?php require_once 'bottom.php';?>
    <script src="sb2/vendor/datatables/js/jquery.dataTables.js"></script>
    <script src="sb2/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
    <script src="sb2/vendor/datatables-responsive/dataTables.responsive.js"></script>
    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
            responsive: true,
            "aaSorting": [[ 0, "desc" ]],
            "aLengthMenu": [ 50, 25, 10, 1]
        });
    });
    </script>